package com.xipu.yygh.statistics.controller;

import com.xipu.yygh.common.result.R;
import com.xipu.yygh.feign.service_order.OrderFeignClient;
import com.xipu.yygh.vo.order.OrderCountQueryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * description: 预约统计管理Controller
 * @author: gql
 * @date: 2022/05
 */
@RestController
@RequestMapping("/admin/statistics")
public class StatisticsController {
    /**
     * 订单模块feign
     */
    @Autowired
    private OrderFeignClient orderFeignClient;

    /**
     * 获取订单统计数据
     * @param orderCountQueryVo 查询订单数量Vo
     * @return r
     */
    @GetMapping("getCountMap")
    public R getCountMap(OrderCountQueryVo orderCountQueryVo) {
        Map<String, Object> map = orderFeignClient.getCountMap(orderCountQueryVo);
        return R.ok().data(map);
    }
}
